#!/bin/sh

SCIp='127.0.0.1'
CLIPort='9090'

echo Is srvrpowerctrl available via the CLI?
echo can srvrpowerctrl | nc -w 3 $SCIp $CLIPort
echo .
echo Setting blocks:
echo srvrpowerctrl setblock I_really_dont_want_to_be_bothered viacli | nc -w 3 $SCIp $CLIPort
echo srvrpowerctrl setblock the_music_is_too_beautiful_to_end viacli | nc -w 3 $SCIp $CLIPort
echo .
echo Listing blocks:
echo srvrpowerctrl listblock nada nada | nc -w 3 $SCIp $CLIPort
echo .
echo Attempting a shutdown:
echo srvrpowerctrl shutdown time_to_go_to_bed viacli | nc -w 3 $SCIp $CLIPort
echo .
echo Clearing blocks:
echo srvrpowerctrl clearblock This_wont_work ziacli | nc -w 3 $SCIp $CLIPort
echo srvrpowerctrl clearblock nada viacli | nc -w 3 $SCIp $CLIPort
echo .
echo Listing blocks:
echo srvrpowerctrl listblock nada viacli | nc -w 3 $SCIp $CLIPort
echo .
echo Clearing blocks:
echo srvrpowerctrl clearblock nada viacli | nc -w 3 $SCIp $CLIPort
echo srvrpowerctrl clearblock nada viacli | nc -w 3 $SCIp $CLIPort
echo .
echo Listing blocks:
echo srvrpowerctrl listblock nada viacli | nc -w 3 $SCIp $CLIPort



